%page inherit Index;

%override Body
	% var page = args(0);
	% var name = args(1);
    <div class="content wiki" style="background-color:{%rand_color()%};">
		<h2>{% name %}</h2>
		
		%if(page==null)
			<div class="wiki wiki-editor"> 
				<form method="post" action="/wiki/save">
					<input type="hidden" name="name" value="{% name %}">
					<div>
						<textarea cols="80" rows="24" name="content"></textarea>
					</div>
					<div>
						</div><input type="submit">
					</div>
				</form>
			</div>
		%else
			<div class="wiki wiki-content" id="{% page.Name %}">
				{% page.FormattedContent %}
			</div>
		%end if
		</div>
    </div>
%end override
